import { createRouter, createWebHashHistory } from 'vue-router'
import Layout from '../layout/Layout.vue'

const routes = [
  
  {
       path: "/login",
       name: "Login",
       component: () => import("../views/Login.vue")
  },
  
  {
    path: "/",
    name:"Layout",
    component: Layout,
    redirect: "/user",
    children: [
      {
        path: "user",
        name: "User",
        component : ()=> import("@/views/User"),
      },
      {
        path : "person",
        name : "Person",
        component : ()=> import("@/views/Person")
      },
    ]
  },
 
]

const router = createRouter({
  history: createWebHashHistory(process.env.BASE_URL),
  routes
})

export default router
 